import requests
import os

def send_fangtang(payload):
    url = os.getenv('FANG_TANG')
    print(url)
    r = requests.post(url, data=payload)
    print(r.text)


def test():
    msg = {}
    msg['title'] = '数据备份完成'
    msg['desp'] = '数据大小:10mb,服务器空间1024Gib,已成功备份到网盘.'
    msg['short'] = '备份通知'
    msg['channel'] = '9'
    send_fangtang(msg)

if __name__ == '__main__':
    test()
